package com.bwie.system.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.system.service.UserService;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：ShenJiaFeng
 * @Package：com.bwie.controller
 * @Project：zg5_19
 * @name：UserController
 * @Date：2024/2/17 9:29
 */
@RestController
@RequestMapping("/user")
public class UserController {
    private final UserService userService;

    public UserController(UserService userService) {
        this.userService = userService;
    }

    @PostMapping("/findByUserName")
    public Result<User> findByUserName(@RequestParam String userName){
        User byUserName = userService.findByUserName(userName);
        return Result.success(byUserName);
    }
    @PostMapping("/test")
    public String test2(){
        return "master分支测试";
    }

    @PostMapping("/masterTest2")
    public String masterTest2(){
        return "masterTest2";
    }

    @GetMapping("/test2")
    public String test22(){
        return "dev分支测试";
    }

}
